package com.itheima.d5_block;

public class Student {
    //    static int number = 10;
//    static String schoollName = "itcast";
//
//
//    static {
//        System.out.println("静态代码块已执行");
//        schoollName = "heima";
//    }
    //实例代码块：{}，每次创建对象时都会执行，且在构造器之前进行
    {
        System.out.println("实例代码块执行了");

    }
    public Student() {
        System.out.println("无参构造器执行了");
    }
    public Student(String name) {
        System.out.println("有参构造器执行了");
    }
}
